home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
buildy1a
/
vsplit
< prev
next >
Wrap
Text File
|
1999-09-07
|
2KB
|
121 lines
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "vSplit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
' local variable(s) to hold property value(s)
Private mHostPane As Object ' local copy
Private mLeftPane As Object ' local copy
Private mRightPane As Object ' local copy
Private mSplitBar As Object ' local copy
Private mSplitOn As Boolean ' local copy
Public Property Get HostPane() As Object
'
Set HostPane = mHostPane
'
End Property
Public Property Set HostPane(ByVal vData As Object)
'
Set mHostPane = vData
'
End Property
Public Property Get RightPane() As Object
'
Set RightPane = mRightPane
'
End Property
Public Property Set RightPane(ByVal vData As Object)
'
Set mRightPane = vData
'
End Property
Public Property Get LeftPane() As Object
'
Set LeftPane = mLeftPane
'
End Property
Public Property Set LeftPane(ByVal vData As Object)
'
Set mLeftPane = vData
'
End Property
Public Property Get SplitBar() As Object
'
Set SplitBar = mSplitBar
'
End Property
Public Property Set SplitBar(ByVal vData As Object)
'
Set mSplitBar = vData
'
End Property
Public Property Get SplitOn() As Boolean
'
SplitOn = mSplitOn
'
End Property
Public Property Let SplitOn(ByVal vData As Boolean)
'
mSplitOn = vData
'
End Property
Public Sub SetPointer(ByVal pType As Integer)
'
mHostPane.MousePointer = pType
'
End Sub
Public Sub ResizePanes(Optional Twips As Single)
'
On Error GoTo localerr
'
If IsMissing(Twips) Then
Twips = 0
End If
'
With mSplitBar
.Top = 0
.Left = .Left + Twips
.Height = mHostPane.ScaleHeight
.Width = 30
End With
'
With mLeftPane
.Top = 0
.Left = 0
.Height = mHostPane.ScaleHeight
.Width = mSplitBar.Left
End With
'
With mRightPane
.Top = 0
.Left = mSplitBar.Left + mSplitBar.Width
.Height = mHostPane.ScaleHeight
.Width = mHostPane.ScaleWidth - _
(mLeftPane.Width + mSplitBar.Width)
End With
'
Exit Sub
'
localerr:
'ignore any errors
End Sub